<template>
	<view class="set">
		<view class="infoDetail">
			<view class="img">
				<image src="../../static/img/user/avatar.jpg"></image>
			</view>
			<view class="infoname">
				<view>九九</view>
				<view>账号名:回忆过2010</view>
			
			</view>
			<view class="icon">
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				我的收货地址
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				我的档案
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul" @click="go()">
			<view>
				密码修改
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				支付
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				消息通知
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				主题皮肤
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				模式切换
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				通用
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				隐私
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				帮助与反馈
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				关于
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="infoul">
			<view>
				商家入驻
			</view>
			<view>
				<u-icon name="arrow-right" label-pos="right" color="gray"></u-icon>
			</view>
		</view>
		<view class="logout" >
			<text>切换账号</text>
		</view>
		<view class="logout" @click="logout()">
			<text>退出登录</text>
		</view>
	</view>
</template>

<script>
	import {mapGetters, mapActions} from 'vuex';
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			...mapActions('user',['logOut']),
			logout(){
				console.log('ll');
				uni.showModal({
					title:'确认退出账号',
					success: (res) => {
						if(res.confirm){
							this.logOut();
						uni.switchTab({
							url:'/pages/info/info'
						})	
						}else if(res.cancel){
							uni.showToast({
								title:'已取消',
								icon:'none'
							})
						}
					}
				})
				
				
			},
			go(){
				uni.navigateTo({
					url:'/pagesJ/updatePass/updatePass'
				})
			}
		}
	}
</script>

<style lang="scss">
	.set{
		background-color: #f0f0ee;
		height: 95vh;
		.infoDetail{
	        padding: 10px;
			background-color: white;
			display: flex;
			align-items: center;
			border-bottom: 1px solid gainsboro;
			.img image{
				width: 50px;
				height: 50px;
				border-radius: 50%;
			}
			.infoname{
				width: 80%;
				margin-left: 10px;
				font-size: 12px;
				line-height: 23px;
				color: gray;
			}
			.infoname view:nth-child(1){
				font-size: 16px;
				color: black;
			}
		}
		.infoul {
			display: flex;
			padding: 10px;
			align-items: center;
			background-color: white;
			justify-content: space-between;
			border-bottom: 1px solid gainsboro;
			font-size: 15px;
		}
		.logout{
			height: 40px;
			text-align: center;
			line-height: 40px;
			margin-top: 10px;
			background-color: white;
		}
	}
</style>
